home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Jumpstart / Multimedia Microsoft Jumpstart Version 1.1a (Microsoft).BIN / develpmt / drivers / mscdex / testdrv / send.asm < prev    next >
Encoding:
Assembly Source File  |  1992-01-23  |  1.3 KB  |  54 lines

  1. ; SEND.ASM
  2. ;
  3. ; Simple asm routine to take packaged request from C, point to it
  4. ; with ES:BX, and send it to the device driver.
  5. ;
  6. ;
  7. ; HISTORY:
  8. ;    10/01/90 Final (v1.0) -by- JYG
  9. ;
  10.  
  11. ?PLM = 0        ; Use C calling conventions
  12. ?WIN = 0        ; We're not windows
  13. include cmacros.inc
  14.  
  15. sysdev  struc
  16. sdevnext        dd      ?       ;Pointer to next device header
  17. sdevatt         dw      ?       ;Attributes of the device
  18. sdevstrat       dw      ?       ;Strategy entry point
  19. sdevint         dw      ?       ;Interrupt entry point
  20. sdevname        db      8 dup (?) ;Name of device (only first byte used for block)
  21. sysdev  ends
  22.  
  23. sBegin data
  24. dev_strat       dd      ?
  25. dev_int         dd      ?
  26. sEnd   data
  27.  
  28. sBegin code
  29.         assumes cs, code
  30.         assumes ds, data
  31.  
  32. cProc   send_req, PUBLIC, <si, di>
  33. parmW   req
  34. parmW   reqseg
  35. parmW   drv
  36. parmW   drvseg
  37. cBegin  send_req
  38.         mov     es,drvseg
  39.         mov     word ptr dev_strat+2,es
  40.         mov     word ptr dev_int+2,es
  41.         mov     bx,drv
  42.         mov     ax,es:[bx].sdevstrat
  43.         mov     word ptr dev_strat,ax
  44.         mov     ax,es:[bx].sdevint
  45.         mov     word ptr dev_int,ax
  46.  
  47.         mov     bx,req
  48.         mov     es,reqseg
  49.         call    dword ptr [dev_strat]
  50.         call    dword ptr [dev_int]
  51. cEnd    send_req
  52. sEnd    code
  53. end
  54.